Next | Prev | Up | Top | Contents | Index

Starting a Single Scheduler

A single Frame Scheduler comes into existence when the FRS control process calls frs_create(). Then the FRS controller calls frs_enqueue() one or more times to tell the new Frame Scheduler the PID values of the processes that it will schedule. The FRS controller calls frs_start() when it has enqueued all the processes. Each scheduled process must call frs_join() when it has initialized itself and is ready to be scheduled.

The Frame Scheduler requires the frs_enqueue() call for a given PID to precede the frs_join() call from the same PID. That is, an activity process cannot join the scheduler until the FRS controller has enqueued it--the frs_join() returns an error unless the calling process has been enqueued. After the Frame Scheduler receives the frs_start() call it waits until all enqueued processes have called frs_join(); then it begins the first minor frame.

Tip: A barrier provides a good way to coordinate the startup of a Frame Scheduler (see "Barriers"). When each activity process starts, it should wait at a barrier. The FRS controller, after performing all the enqueues, comes to the same barrier. The activity processes can then join the scheduler.

Note: In version 1.0, 1.1, and 2.0 of REACT/Pro (the versions used with IRIX prior to version 6.2), the Frame Scheduler allowed a process to join prior to the enqueue. This flexibility was removed in version 3.0 (for IRIX 6.2) in order to simplify the implementation and to improve performance.


Next | Prev | Up | Top | Contents | Index